\(\int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx\) [207]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 13 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}} \]

[Out]

tanh(x)/(-sech(x)^2)^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3738, 4207, 197} \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}} \]

[In]

Int[1/Sqrt[-1 + Tanh[x]^2],x]

[Out]

Tanh[x]/Sqrt[-Sech[x]^2]

Rule 197

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1)/a), x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rule 3738

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\sqrt {-\text {sech}^2(x)}} \, dx \\ & = -\text {Subst}\left (\int \frac {1}{\left (-1+x^2\right )^{3/2}} \, dx,x,\tanh (x)\right ) \\ & = \frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=\frac {\tanh (x)}{\sqrt {-\text {sech}^2(x)}} \]

[In]

Integrate[1/Sqrt[-1 + Tanh[x]^2],x]

[Out]

Tanh[x]/Sqrt[-Sech[x]^2]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {\tanh \left (x \right )}{\sqrt {\tanh \left (x \right )^{2}-1}}\) \(12\)
default \(\frac {\tanh \left (x \right )}{\sqrt {\tanh \left (x \right )^{2}-1}}\) \(12\)
risch \(\frac {{\mathrm e}^{2 x}}{2 \sqrt {-\frac {{\mathrm e}^{2 x}}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}\, \left (1+{\mathrm e}^{2 x}\right )}-\frac {1}{2 \left (1+{\mathrm e}^{2 x}\right ) \sqrt {-\frac {{\mathrm e}^{2 x}}{\left (1+{\mathrm e}^{2 x}\right )^{2}}}}\) \(58\)

[In]

int(1/(tanh(x)^2-1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

tanh(x)/(tanh(x)^2-1)^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (11) = 22\).

Time = 0.25 (sec) , antiderivative size = 36, normalized size of antiderivative = 2.77 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=-\sqrt {-\frac {e^{\left (2 \, x\right )}}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1}} {\left (e^{\left (2 \, x\right )} + 1\right )} e^{\left (-x\right )} \sinh \left (x\right ) \]

[In]

integrate(1/(-1+tanh(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(-e^(2*x)/(e^(4*x) + 2*e^(2*x) + 1))*(e^(2*x) + 1)*e^(-x)*sinh(x)

Sympy [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=\frac {\tanh {\left (x \right )}}{\sqrt {\tanh ^{2}{\left (x \right )} - 1}} \]

[In]

integrate(1/(-1+tanh(x)**2)**(1/2),x)

[Out]

tanh(x)/sqrt(tanh(x)**2 - 1)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (11) = 22\).

Time = 0.28 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.92 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=-\frac {e^{\left (-2 \, x\right )}}{2 \, \sqrt {-e^{\left (-2 \, x\right )}}} + \frac {1}{2 \, \sqrt {-e^{\left (-2 \, x\right )}}} \]

[In]

integrate(1/(-1+tanh(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/2*e^(-2*x)/sqrt(-e^(-2*x)) + 1/2/sqrt(-e^(-2*x))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.62 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=-\frac {1}{2} \, \sqrt {-e^{\left (2 \, x\right )}} - \frac {1}{2 \, \sqrt {-e^{\left (2 \, x\right )}}} \]

[In]

integrate(1/(-1+tanh(x)^2)^(1/2),x, algorithm="giac")

[Out]

-1/2*sqrt(-e^(2*x)) - 1/2/sqrt(-e^(2*x))

Mupad [B] (verification not implemented)

Time = 1.85 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08 \[ \int \frac {1}{\sqrt {-1+\tanh ^2(x)}} \, dx=-\frac {\mathrm {sinh}\left (2\,x\right )\,\sqrt {-\frac {1}{{\mathrm {cosh}\left (x\right )}^2}}}{2} \]

[In]

int(1/(tanh(x)^2 - 1)^(1/2),x)

[Out]

-(sinh(2*x)*(-1/cosh(x)^2)^(1/2))/2